From: Jasper St. Pierre Date: Mon, 28 Feb 2011 18:13:32 +0000 (-0500) Subject: messageTray: Add Source.pushNotification method X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8676 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4029202635fdea3ad8ef2a5caac3bdbebff6d147;p=gnome-shell.git messageTray: Add Source.pushNotification method This allows clients to make minor adjustments to their notification content without triggering a new popup. https://bugzilla.gnome.org/show_bug.cgi?id=642793 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 4f2512238..8a29597de 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -844,12 +844,13 @@ Source.prototype = { return this._iconBin; }, - notify: function(notification) { + pushNotification: function(notification) { if (this.notification) { this.notification.disconnect(this._notificationClickedId); this.notification.disconnect(this._notificationDestroyedId); } + // FIXME: Right now, we don't save multiple notifications. this.notification = notification; this._notificationClickedId = notification.connect('clicked', Lang.bind(this, this.open)); @@ -862,7 +863,10 @@ Source.prototype = { this._notificationRemoved(); } })); + }, + notify: function(notification) { + this.pushNotification(notification); this.emit('notify', notification); },